{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo $this->createWebUrl('agent');}">分销商管理</a></li>
	<li><a href="{php echo $this->createWebUrl('commission', array('op'=>'commissionlog'));}">分销佣金明细</a></li>
	<li><a href="{php echo $this->createWebUrl('commission', array('op'=>'statis'));}">分销佣金统计</a></li>
	<li><a href="{php echo $this->createWebUrl('commission', array('op'=>'level'));}">分销商等级</a></li>
	<li><a href="{php echo $this->createWebUrl('comsetting');}">分销设置</a></li>
</ul>

<style type="text/css">
.self{margin:4px 0;}
</style>
<div class="panel panel-default">
    <div class='panel-body'>
    <div style='height:100px;width:110px;float:left;'>
         <img src='{$member['avatar']}' style='width:100px;height:100px;border:1px solid #ccc;padding:1px' />
    </div>
    <div style='float:left;height:100px;overflow: hidden'>
        <p class="self">会员昵称：{$member['nickname']}</p>
        <p class="self">会员姓名：{$member['realname']}</p>
        <p class="self">手机号码：{$member['mobile']}</p>
        <p class="self">我的团队：<span style='color:red'>{$total}</span> 人</p>
	</div>
</div>
 
<div class="panel panel-default">
    <div class="panel-heading">我的团队</div>
    <div class="panel-body">
        <table class="table table-hover" style="overflow:visible;">
            <thead class="navbar-inner">
                <tr>
                    <th style='width:8%;'>会员ID</th>
					<th style='width:12%;'>粉丝</th>
					<th style='width:12%;'>真实名字<br/>手机号码</th>
					<th style='width:10%;'>已结佣金<br/>累计佣金</th>
					<th style='width:12%;'>分销状态</th>
					<th style='width:10%;'>Ta的团队</th>
					<th style='width:13%;'>代理时间</th>
					<th style='width:10%'>操作</th>
                </tr>
            </thead>
            <tbody>
				{loop $teamlist $row}
				<tr>
					<td>{$row['uid']}</td>
					<td>
						{if !empty($row['avatar'])}
						<img src="{$row['avatar']}" style='width:30px;height:30px;padding1px;border:1px solid #ccc' />
						{/if}
						{if empty($row['nickname'])}未设置{else}{$row['nickname']}{/if}

					</td>
					<td>{$row['realname']} <br/>{$row['mobile']}</td>
					<td>{$row['pay_commission']} 元<br/>{php echo $row['pay_commission']+$row['nopay_commission'];} 元</td>
					<td>{if $row['status']==1}<span class="label label-success">正常</span>{else}<span class="label label-default">冻结</span>{/if}</td>
					<td>{$row['recnum']}</td>
					<td>{php echo date('Y-m-d H:i',$row['addtime']);}</td>
					<td style="overflow:visible;">
						<div class="btn-group btn-group-sm">
							<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="javascript:;">操作 <span class="caret"></span></a>
							<ul class="dropdown-menu dropdown-menu-left" role="menu" style='z-index: 99999'>
								<li><a href="{php echo $this->createWebUrl('agent', array('op'=>'detail', 'uid'=>$row['uid']));}" title="编辑"><i class="fa fa-pencil"></i> 编辑</a></li>
								<li><a href="{php echo $this->createWebUrl('team', array('uid'=>$row['uid']));}" title="查看下级成员"><i class="fa fa-list"></i> 查看下级成员</a></li>
							</ul>
						</div>
					</td>
				</tr>
				{/loop}
            </tbody>
        </table>
        {$pager}
    </div>
</div>
{template 'common/footer'}